package com.infinitus.autocatlog.task;




import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.infinitus.autocatlog.domain.KafkaConfig;

@Component
public class Start {
	@Autowired
	public Cleaner cleaner;
	
	@Autowired
	private LoadDataTask loadDataTask;
	
	@Autowired
	private KafkaConfig kafkaConfig;
	
	public  Start( ) {
	
	}
	 
	@PostConstruct
	public void initialize() throws InterruptedException {
		//加载缓存数据
		loadDataTask.loadQueryType();
		System.out.println("...............启动kafka消息清洗模块................");
		cleaner.userbehaviorClean(kafkaConfig.getAppProTopic(), "app", true);
		cleaner.userbehaviorClean(kafkaConfig.getPcProTopic(), "pc", true);
		cleaner.userbehaviorClean(kafkaConfig.getAppTestTopic(), "app", false);
		cleaner.userbehaviorClean(kafkaConfig.getPcTestTopic(), "pc", false);
	}

}
